home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Resources / Partition Logic 0.61 / partlogic-0.61.iso / system / headers / sys / loader.h < prev    next >
C/C++ Source or Header  |  2006-01-31  |  2KB  |  80 lines

  1. // 
  2. //  Visopsys
  3. //  Copyright (C) 1998-2006 J. Andrew McLaughlin
  4. //  
  5. //  This library is free software; you can redistribute it and/or modify it
  6. //  under the terms of the GNU Lesser General Public License as published by
  7. //  the Free Software Foundation; either version 2.1 of the License, or (at
  8. //  your option) any later version.
  9. //
  10. //  This library is distributed in the hope that it will be useful, but
  11. //  WITHOUT ANY WARRANTY; without even the implied warranty of
  12. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
  13. //  General Public License for more details.
  14. //
  15. //  You should have received a copy of the GNU Lesser General Public License
  16. //  along with this library; if not, write to the Free Software Foundation,
  17. //  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. //
  19. //  loader.h
  20. //
  21.  
  22. // This file contains definitions and structures for using the Visopsys
  23. // kernel loader
  24.  
  25. #if !defined(_LOADER_H)
  26.  
  27. // Loader File class types
  28. #define LOADERFILECLASS_EMPTY    0x0000
  29. #define LOADERFILECLASS_TEXT     0x1000
  30. #define LOADERFILECLASS_BIN      0x2000
  31. #define LOADERFILECLASS_STATIC   0x0001
  32. #define LOADERFILECLASS_DYNAMIC  0x0002
  33. #define LOADERFILECLASS_EXEC     0x0004
  34. #define LOADERFILECLASS_OBJ      0x0008
  35. #define LOADERFILECLASS_LIB      0x0010
  36. #define LOADERFILECLASS_CORE     0x0020
  37. #define LOADERFILECLASS_IMAGE    0x0040
  38. #define LOADERFILECLASS_DATA     0x0080
  39. #define LOADERFILECLASS_CONFIG   0x0100
  40. #define LOADERFILECLASS_BOOT     0x0200
  41.  
  42. // Symbol bindings for loader symbol structure
  43. #define LOADERSYMBOLBIND_LOCAL   0
  44. #define LOADERSYMBOLBIND_GLOBAL  1
  45. #define LOADERSYMBOLBIND_WEAK    2
  46.  
  47. // Symbol types for the loader symbol structure
  48. #define LOADERSYMBOLTYPE_NONE    0
  49. #define LOADERSYMBOLTYPE_OBJECT  1
  50. #define LOADERSYMBOLTYPE_FUNC    2
  51. #define LOADERSYMBOLTYPE_SECTION 3
  52. #define LOADERSYMBOLTYPE_FILE    4
  53.  
  54. // This structure describes the classification of the file.
  55. typedef struct {
  56.   char className[64];
  57.   int flags;
  58.  
  59. } loaderFileClass;
  60.  
  61. typedef struct {
  62.   char *name;
  63.   int defined;
  64.   void *value;
  65.   unsigned size;
  66.   int binding;
  67.   int type;
  68.  
  69. } loaderSymbol;
  70.  
  71. typedef struct {
  72.   int numSymbols;
  73.   int tableSize;
  74.   loaderSymbol symbols[];
  75.  
  76. } loaderSymbolTable;
  77.  
  78. #define _LOADER_H
  79. #endif
  80.